package org.jctc.els.common.prop;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * MQTT参数封装
 *
 * @author Lianxw
 * @since 2022/3/10
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "spring.integration.mqtt")
public class MqttProperties {
	private String clientId;
	private String url;
	private String username;
	private String password;
	private List<ProcessorInfo> processors = new ArrayList<>();

	@Data
	public static class ProcessorInfo {
		private String name;
		private String topic;
		private String processorBean;
	}
}
